﻿using System;
using Wslzy.Auxiliary.Infrastructure.Datas.UnitOfWorks;
using Wslzy.Auxiliary.Infrastructure.Domains;
using Wslzy.Auxiliary.Infrastructure.Domains.Repositories;

namespace Wslzy.Auxiliary.Infrastructure.Datas.EF.Core
{
    /// <summary>
    /// 仓储
    /// </summary>
    /// <typeparam name="TEntity">实体类型</typeparam>
    /// <typeparam name="TKey">实体标识类型</typeparam>
    public abstract class RepositoryBase<TEntity, TKey> : StoreBase<TEntity, TKey>, IRepository<TEntity, TKey>
        where TEntity : class, IEntity<TEntity, TKey>,IVersion
    {
        /// <summary>
        /// 初始化仓储
        /// </summary>
        /// <param name="unitOfWork">工作单元</param>
        protected RepositoryBase(IUnitOfWork unitOfWork) : base(unitOfWork)
        {
        }
    }
}
